package com.cdxy.controller;


import com.cdxy.aop.ForceLogin;
import com.cdxy.biz.process.IScenePostBizProcess;
import com.cdxy.model.dto.base.controller.BaseController;
import com.cdxy.model.dto.base.resp.ApiResponse;
import com.cdxy.model.dto.req.ScenePostReleaseReq;
import com.cdxy.util.AxUidUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户景点发帖表 前端控制器
 * </p>
 *
 * @author autoGenCode
 * @since 2020-03-05
 */
@RestController
@RequestMapping("/scenePost")
@Api(tags = "景点帖子")
public class ScenePostController extends BaseController {

    @Autowired
    private IScenePostBizProcess scenePostBizProcess;

    @Autowired
    private AxUidUtil axUidUtil;

    @PostMapping("/scenePostRelease")
    @ApiOperation(value = "酒店评论发布", notes = "")
    @ForceLogin
    public ApiResponse scenePostRelease(@Validated @RequestBody ScenePostReleaseReq scenePostReleaseReq) {
        scenePostReleaseReq.setAxUid(axUidUtil.getAxUid());
        scenePostBizProcess.scenePostRelease(scenePostReleaseReq);
        return successApiResponse();
    }

}
